﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ActionPluginAPI;
using System.IO;
using iMapa.Helper;


namespace RunCommandActionPlugin
{
    public class RunCommandActionParameters : ViewModelBase,IActionParameters
    {
        private string id;
        private string directory;
        private string command;
        private string arguments;

        public RunCommandActionParameters()
        {
            id = this.GetHashCode().ToString();
        }

        public void PersistToFile(string filename)
        {
            ObjectXMLSerializer<RunCommandActionParameters>.Save(this, filename);
        }

        public string Directory
        {
            get { return directory; }
            set { directory = value;
            onPropertyChanged("Directory");
            }
        }
        public string Command
        {
            get { return command; }
            set { command = value; }
        }
        public string Arguments
        {
            get { return arguments; }
            set { arguments = value; }
        }

        public void SetID(string value)
        {
            this.id = value;
        }

        public string GetID()
        {
            return id;
        }


        public string[] GetResourceFiles()
        {
            return null;
        }
    }
}
